﻿using System;
using System.Globalization;
using Windows.UI.Xaml.Data;

namespace Win8nl.Converters
{
  public class ToLowerConverter : IValueConverter
  {
    public object Convert(object value, Type targetType, object parameter, string culture)
    {
      if (value != null && value is string)
      {
        var cValue = (string)value;
        return cValue.ToLowerInvariant();
      }

      return null;
    }

    public object ConvertBack(object value, Type targetType, object parameter, string culture)
    {
      throw new NotImplementedException();
    }
  }
}
